# Maintainer: Simon Rupf <simon@rupf.net>
pkgname=sequoia-chameleon-gnupg
pkgver=0.8.0
pkgrel=0
pkgdesc="Sequoia's reimplementation of the GnuPG interface"
url="https://sequoia-pgp.org/"
# ring
arch="all !ppc64le !s390x !riscv64"
license="GPL-3.0-or-later"
makedepends="
	bzip2-dev
	cargo
	cargo-auditable
	clang15-dev
	nettle-dev
	openssl-dev
	sqlite-dev
	"
source="https://gitlab.com/sequoia-pgp/sequoia-chameleon-gnupg/-/archive/v$pkgver/sequoia-chameleon-gnupg-v$pkgver.tar.gz
	"
builddir="$srcdir/$pkgname-v$pkgver"
options="net !check" # bunch of failures against gpg cli

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --release --frozen
}

check() {
	cargo test --frozen
}

package() {
	install -Dm755 target/release/gpgv-sq target/release/gpg-sq \
		-t "$pkgdir"/usr/bin
}

sha512sums="
e149579b144d04c1ee0c9ac8f1a7dc7844e8a035b06000e0e854e87621b51d34d49c6a27787784358460aef5e9ca011d6947c064d09b0e1601ded9dedcb9b6fe  sequoia-chameleon-gnupg-v0.8.0.tar.gz
"
